﻿#pragma once
#include <QObject>

#include "../SystemJournal/systemjournal.h"
#include "../component/componentmanager.h"

class SystemStateBase : public QObject
{
	Q_OBJECT

public:
	SystemStateBase(QObject* parent);
	~SystemStateBase();
	void SetStop()
	{
		stopFlag = true;
	}
	virtual bool InitState() = 0;
	virtual bool Running() = 0;

public slots:
	virtual void ComponentEvnetHandle(int event) = 0;

signals:
	void ChangeSystemState(int state);
protected:
	bool stopFlag = true;
	SystemJournal* m_writer;
	ComponentManager* m_com;
};